using System;
using System.Collections.Generic;
using System.Reflection;
using System.Runtime.InteropServices;

using ILRuntime.CLR.TypeSystem;
using ILRuntime.CLR.Method;
using ILRuntime.Runtime.Enviorment;
using ILRuntime.Runtime.Intepreter;
using ILRuntime.Runtime.Stack;
using ILRuntime.Reflection;
using ILRuntime.CLR.Utils;
using System.Linq;

namespace ILRuntime.Runtime.Generated
{
    unsafe class huqiang_UIComposite_DropdownEx_Binding
    {
        public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
        {
            BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly;
            MethodBase method;
            FieldInfo field;
            Type[] args;
            Type type = typeof(huqiang.UIComposite.DropdownEx);
            args = new Type[]{};
            method = type.GetMethod("get_scrollY", flag, null, args, null);
            app.RegisterCLRMethodRedirection(method, get_scrollY_0);
            args = new Type[]{typeof(huqiang.UIComposite.ScrollY)};
            method = type.GetMethod("set_scrollY", flag, null, args, null);
            app.RegisterCLRMethodRedirection(method, set_scrollY_1);
            args = new Type[]{};
            method = type.GetMethod("get_SelectIndex", flag, null, args, null);
            app.RegisterCLRMethodRedirection(method, get_SelectIndex_2);
            args = new Type[]{typeof(System.Int32)};
            method = type.GetMethod("set_SelectIndex", flag, null, args, null);
            app.RegisterCLRMethodRedirection(method, set_SelectIndex_3);
            args = new Type[]{typeof(huqiang.Data.FakeStruct), typeof(huqiang.Core.HGUI.UIElement), typeof(huqiang.Core.HGUI.UIInitializer)};
            method = type.GetMethod("Initial", flag, null, args, null);
            app.RegisterCLRMethodRedirection(method, Initial_4);
            args = new Type[]{typeof(huqiang.UIComposite.PopItemMod), typeof(System.Object), typeof(System.Int32)};
            method = type.GetMethod("ItemUpdate", flag, null, args, null);
            app.RegisterCLRMethodRedirection(method, ItemUpdate_5);
            args = new Type[]{typeof(System.Single)};
            method = type.GetMethod("Update", flag, null, args, null);
            app.RegisterCLRMethodRedirection(method, Update_6);

            field = type.GetField("MaxHeight", flag);
            app.RegisterCLRFieldGetter(field, get_MaxHeight_0);
            app.RegisterCLRFieldSetter(field, set_MaxHeight_0);
            app.RegisterCLRFieldBinding(field, CopyToStack_MaxHeight_0, AssignFromStack_MaxHeight_0);
            field = type.GetField("PopOffset", flag);
            app.RegisterCLRFieldGetter(field, get_PopOffset_1);
            app.RegisterCLRFieldSetter(field, set_PopOffset_1);
            app.RegisterCLRFieldBinding(field, CopyToStack_PopOffset_1, AssignFromStack_PopOffset_1);
            field = type.GetField("ItemSize", flag);
            app.RegisterCLRFieldGetter(field, get_ItemSize_2);
            app.RegisterCLRFieldSetter(field, set_ItemSize_2);
            app.RegisterCLRFieldBinding(field, CopyToStack_ItemSize_2, AssignFromStack_ItemSize_2);
            field = type.GetField("callBack", flag);
            app.RegisterCLRFieldGetter(field, get_callBack_3);
            app.RegisterCLRFieldSetter(field, set_callBack_3);
            app.RegisterCLRFieldBinding(field, CopyToStack_callBack_3, AssignFromStack_callBack_3);
            field = type.GetField("OnSelectChanged", flag);
            app.RegisterCLRFieldGetter(field, get_OnSelectChanged_4);
            app.RegisterCLRFieldSetter(field, set_OnSelectChanged_4);
            app.RegisterCLRFieldBinding(field, CopyToStack_OnSelectChanged_4, AssignFromStack_OnSelectChanged_4);


            app.RegisterCLRCreateDefaultInstance(type, () => new huqiang.UIComposite.DropdownEx());
            app.RegisterCLRCreateArrayInstance(type, s => new huqiang.UIComposite.DropdownEx[s]);

            args = new Type[]{};
            method = type.GetConstructor(flag, null, args, null);
            app.RegisterCLRMethodRedirection(method, Ctor_0);

        }


        static StackObject* get_scrollY_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject* ptr_of_this_method;
            StackObject* __ret = ILIntepreter.Minus(__esp, 1);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            huqiang.UIComposite.DropdownEx instance_of_this_method = (huqiang.UIComposite.DropdownEx)typeof(huqiang.UIComposite.DropdownEx).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            __intp.Free(ptr_of_this_method);

            var result_of_this_method = instance_of_this_method.scrollY;

            object obj_result_of_this_method = result_of_this_method;
            if(obj_result_of_this_method is CrossBindingAdaptorType)
            {    
                return ILIntepreter.PushObject(__ret, __mStack, ((CrossBindingAdaptorType)obj_result_of_this_method).ILInstance);
            }
            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }

        static StackObject* set_scrollY_1(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject* ptr_of_this_method;
            StackObject* __ret = ILIntepreter.Minus(__esp, 2);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            huqiang.UIComposite.ScrollY @value = (huqiang.UIComposite.ScrollY)typeof(huqiang.UIComposite.ScrollY).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            __intp.Free(ptr_of_this_method);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            huqiang.UIComposite.DropdownEx instance_of_this_method = (huqiang.UIComposite.DropdownEx)typeof(huqiang.UIComposite.DropdownEx).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            __intp.Free(ptr_of_this_method);

            instance_of_this_method.scrollY = value;

            return __ret;
        }

        static StackObject* get_SelectIndex_2(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject* ptr_of_this_method;
            StackObject* __ret = ILIntepreter.Minus(__esp, 1);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            huqiang.UIComposite.DropdownEx instance_of_this_method = (huqiang.UIComposite.DropdownEx)typeof(huqiang.UIComposite.DropdownEx).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            __intp.Free(ptr_of_this_method);

            var result_of_this_method = instance_of_this_method.SelectIndex;

            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static StackObject* set_SelectIndex_3(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject* ptr_of_this_method;
            StackObject* __ret = ILIntepreter.Minus(__esp, 2);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            System.Int32 @value = ptr_of_this_method->Value;

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            huqiang.UIComposite.DropdownEx instance_of_this_method = (huqiang.UIComposite.DropdownEx)typeof(huqiang.UIComposite.DropdownEx).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            __intp.Free(ptr_of_this_method);

            instance_of_this_method.SelectIndex = value;

            return __ret;
        }

        static StackObject* Initial_4(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject* ptr_of_this_method;
            StackObject* __ret = ILIntepreter.Minus(__esp, 4);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            huqiang.Core.HGUI.UIInitializer @initializer = (huqiang.Core.HGUI.UIInitializer)typeof(huqiang.Core.HGUI.UIInitializer).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            __intp.Free(ptr_of_this_method);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            huqiang.Core.HGUI.UIElement @script = (huqiang.Core.HGUI.UIElement)typeof(huqiang.Core.HGUI.UIElement).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            __intp.Free(ptr_of_this_method);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
            huqiang.Data.FakeStruct @mod = (huqiang.Data.FakeStruct)typeof(huqiang.Data.FakeStruct).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            __intp.Free(ptr_of_this_method);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 4);
            huqiang.UIComposite.DropdownEx instance_of_this_method = (huqiang.UIComposite.DropdownEx)typeof(huqiang.UIComposite.DropdownEx).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            __intp.Free(ptr_of_this_method);

            instance_of_this_method.Initial(@mod, @script, @initializer);

            return __ret;
        }

        static StackObject* ItemUpdate_5(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject* ptr_of_this_method;
            StackObject* __ret = ILIntepreter.Minus(__esp, 4);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            System.Int32 @index = ptr_of_this_method->Value;

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            System.Object @o = (System.Object)typeof(System.Object).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            __intp.Free(ptr_of_this_method);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
            huqiang.UIComposite.PopItemMod @g = (huqiang.UIComposite.PopItemMod)typeof(huqiang.UIComposite.PopItemMod).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            __intp.Free(ptr_of_this_method);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 4);
            huqiang.UIComposite.DropdownEx instance_of_this_method = (huqiang.UIComposite.DropdownEx)typeof(huqiang.UIComposite.DropdownEx).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            __intp.Free(ptr_of_this_method);

            instance_of_this_method.ItemUpdate(@g, @o, @index);

            return __ret;
        }

        static StackObject* Update_6(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject* ptr_of_this_method;
            StackObject* __ret = ILIntepreter.Minus(__esp, 2);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            System.Single @time = *(float*)&ptr_of_this_method->Value;

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            huqiang.UIComposite.DropdownEx instance_of_this_method = (huqiang.UIComposite.DropdownEx)typeof(huqiang.UIComposite.DropdownEx).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            __intp.Free(ptr_of_this_method);

            instance_of_this_method.Update(@time);

            return __ret;
        }


        static object get_MaxHeight_0(ref object o)
        {
            return ((huqiang.UIComposite.DropdownEx)o).MaxHeight;
        }

        static StackObject* CopyToStack_MaxHeight_0(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.UIComposite.DropdownEx)o).MaxHeight;
            __ret->ObjectType = ObjectTypes.Float;
            *(float*)&__ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static void set_MaxHeight_0(ref object o, object v)
        {
            ((huqiang.UIComposite.DropdownEx)o).MaxHeight = (System.Single)v;
        }

        static StackObject* AssignFromStack_MaxHeight_0(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.Single @MaxHeight = *(float*)&ptr_of_this_method->Value;
            ((huqiang.UIComposite.DropdownEx)o).MaxHeight = @MaxHeight;
            return ptr_of_this_method;
        }

        static object get_PopOffset_1(ref object o)
        {
            return ((huqiang.UIComposite.DropdownEx)o).PopOffset;
        }

        static StackObject* CopyToStack_PopOffset_1(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.UIComposite.DropdownEx)o).PopOffset;
            __ret->ObjectType = ObjectTypes.Float;
            *(float*)&__ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static void set_PopOffset_1(ref object o, object v)
        {
            ((huqiang.UIComposite.DropdownEx)o).PopOffset = (System.Single)v;
        }

        static StackObject* AssignFromStack_PopOffset_1(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.Single @PopOffset = *(float*)&ptr_of_this_method->Value;
            ((huqiang.UIComposite.DropdownEx)o).PopOffset = @PopOffset;
            return ptr_of_this_method;
        }

        static object get_ItemSize_2(ref object o)
        {
            return ((huqiang.UIComposite.DropdownEx)o).ItemSize;
        }

        static StackObject* CopyToStack_ItemSize_2(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.UIComposite.DropdownEx)o).ItemSize;
            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }

        static void set_ItemSize_2(ref object o, object v)
        {
            ((huqiang.UIComposite.DropdownEx)o).ItemSize = (UnityEngine.Vector2)v;
        }

        static StackObject* AssignFromStack_ItemSize_2(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            UnityEngine.Vector2 @ItemSize = (UnityEngine.Vector2)typeof(UnityEngine.Vector2).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)16);
            ((huqiang.UIComposite.DropdownEx)o).ItemSize = @ItemSize;
            return ptr_of_this_method;
        }

        static object get_callBack_3(ref object o)
        {
            return ((huqiang.UIComposite.DropdownEx)o).callBack;
        }

        static StackObject* CopyToStack_callBack_3(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.UIComposite.DropdownEx)o).callBack;
            object obj_result_of_this_method = result_of_this_method;
            if(obj_result_of_this_method is CrossBindingAdaptorType)
            {    
                return ILIntepreter.PushObject(__ret, __mStack, ((CrossBindingAdaptorType)obj_result_of_this_method).ILInstance);
            }
            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }

        static void set_callBack_3(ref object o, object v)
        {
            ((huqiang.UIComposite.DropdownEx)o).callBack = (huqiang.UIEvent.UserEvent)v;
        }

        static StackObject* AssignFromStack_callBack_3(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            huqiang.UIEvent.UserEvent @callBack = (huqiang.UIEvent.UserEvent)typeof(huqiang.UIEvent.UserEvent).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            ((huqiang.UIComposite.DropdownEx)o).callBack = @callBack;
            return ptr_of_this_method;
        }

        static object get_OnSelectChanged_4(ref object o)
        {
            return ((huqiang.UIComposite.DropdownEx)o).OnSelectChanged;
        }

        static StackObject* CopyToStack_OnSelectChanged_4(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.UIComposite.DropdownEx)o).OnSelectChanged;
            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }

        static void set_OnSelectChanged_4(ref object o, object v)
        {
            ((huqiang.UIComposite.DropdownEx)o).OnSelectChanged = (System.Action<huqiang.UIComposite.DropdownEx, System.Object>)v;
        }

        static StackObject* AssignFromStack_OnSelectChanged_4(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.Action<huqiang.UIComposite.DropdownEx, System.Object> @OnSelectChanged = (System.Action<huqiang.UIComposite.DropdownEx, System.Object>)typeof(System.Action<huqiang.UIComposite.DropdownEx, System.Object>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)8);
            ((huqiang.UIComposite.DropdownEx)o).OnSelectChanged = @OnSelectChanged;
            return ptr_of_this_method;
        }



        static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject* __ret = ILIntepreter.Minus(__esp, 0);

            var result_of_this_method = new huqiang.UIComposite.DropdownEx();

            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }


    }
}
